<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/inv/invReturnPurchase.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
		}
	});
	$('.add-tag-input').keydown(function(e){
		  if (e.keyCode==13){
			  loadCommodity_invReturnPurchase($(this));
			  this.value = "";
		  }
	});
});


</script>

<style>
.my-filter-table {
	background: linear-gradient(to bottom, #F1FAFE 0%, #D9EDF7 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
	border: 1px solid #9BE2F0;
	display: inline-block;
	margin-bottom: 5px;
	margin-left: 5px;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.my-filter-table a {
	color: #3A87AD;
    display: inline-block;
    margin: 0 4px;
}

.my-filter-table button {
	background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border: 0 none;
    cursor: pointer;
    padding: 0;
    color: #000000;
    float: right;
    font-size: 20px;
    font-weight: bold;
    line-height: 20px;
    opacity: 0.4;
    text-shadow: 0 1px 0 #FFFFFF;
}

.add-tag-input {
	width:150px;
}
</style>
<form id="editForm">
	<table class="table table-bordered animate2 fadeInUp">
		<tr>
			<td>来往商名称:&nbsp;&nbsp;&nbsp;
				<div class="input-append">
					<input class="bn not-null" id="bname" name="bname" type="text" style="width:120px;" value="${(purchase.bname)!''}" readonly/>
					<input id="bc" name="bc" value="${(purchase.bc)!''}" type="hidden" />
					<button class="btn btn-xs btn-primary" type="button" onclick="javascript:selectBn_invReturnPurchase($(this));return false;"><i class="icon-search"></i></button>
				</div>
			</td>
			<td>实退金额:&nbsp;&nbsp;<input id="total" name="total" value="0" type="text" class="not-null"/></td>
			<td rowspan="2">退货原因:&nbsp;&nbsp;<textarea id="remark" name="remark" value="${(purchase.remark)!''}"  class="not-null"/></td>
		</tr>
		<tr>
			<td>请输入序列号:&nbsp;<input type="text" class="add-tag-input" /></td>
			<td>应退金额:&nbsp;&nbsp;<input id="total1" type="text"/></td>
		</tr>
	</table>

	<table class="table table-bordered animate2 fadeInUp">
		<thead>
			<tr height="40">
				<th>商品名称<a href="javascript:;" onclick="javascript:add_invReturnPurchase();return false;" style="margin-left: 10px">[添加空白行]</a></th>
				<th>序列号状态</th>
				<th>数量</th>
				<th>单价</th>
				<th>仓库</th>
				<th style="width:32px;">操作</th>
			</tr>
		</thead>
		<tbody id="ListBody">
		</tbody>
		<tr height="40">
			<td colspan="7" style="text-align: center;">
				<a href="javascript:;" class="btn btn-info" onclick="javascript: save_invReturnPurchase(); return false;"><i class="icon-save"></i>&nbsp;保&nbsp;&nbsp;存</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="javascript:;" class="btn btn-primary" onclick="javascript: sys_load_handle('invReturnPurchase');return false;"><i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消</a>
			</td>
		</tr>
	</table>
</form>




<table style="display:none;" id="tempTable" i="0">
	<tr class="rep">
		<td>
			<div class="input-append">
			<input class="cname" type="text" style="width:120px;" readonly />
			<input class="cc" type="hidden" />
			<button class="btn btn-xs btn-primary" type="button" style="display:none;"><i class="icon-search"></i></button>
			</div>
		</td>
		<td><input class="snc" style="width:100px;" type="hidden" readonly/><span class="s"></span></td>
		<td><input class="count" type="text" style="width:60px;" onchange="javascript:price_invReturnPurchase($(this));return false;" onkeyup="javascript:checkNum_invReturnPurchase($(this));return false;"/></td>
		<td><input class="price" type="text" style="width:80px;" readonly/></td>
		<input class="to" type="hidden"/>
		<td>
			<input class="dname" type="text" style="width:120px;" readonly />
			<input class="dc" type="hidden" />
		</td>
		<td style="text-align:center;"><a class="btn btn-danger" href="javascript:;" onclick="javascript:delete_invReturnPurchase($(this));return false;"><i class="icon-remove"></i></a></td>
	</tr>
	<tr j="0">
		<td colspan="7">
			
		</td>
	</tr>
</table>
<div style="display:none;" id="tempDiv">
	<div class="my-filter-table div-rep">
		<input class="serial form-control" type="hidden" style="width:60px;" />
		<a class="show-serial" href="javascript:;"></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<button type="button" class="del-tag" data-dismiss="alert">&times;</button>
	</div>
</div>